package cn.zwx.common.limiter.enums;

/**
 * @author zhangwenxue
 */
public enum PeriodExecuteCodeEnum {

    /**
     *表示错误,比如可能是redis故障、过载
     */
    INTERNAL_OVER_QUOTA(0,"表示错误,比如可能是redis故障、过载"),
    /**
     * 允许
     */
    INTERNAL_ALLOWED(1,"允许"),
    /**
     * 允许但是当前窗口内已到达上限
     */
    INTERNAL_HIT_QUOTA(2,"允许但是当前窗口内已到达上限"),

    UNKNOWN(3,"拒绝"),
    ;
    private int code;

    private String msg;

     PeriodExecuteCodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

}
